#ifndef _VBUFFER_H_
#define _VBUFFER_H_

#include "types.h"

enum vertex_format
{
	vf_xyz		= 0x2,
	vf_xyzrwh	= 0x4,
	vf_normal	= 0x10,
	vf_diffuze	= 0x40,
	vf_specular	= 0x80,
	vf_texture0 = 0x0,
	vf_texture1 = 0x100,
	vf_texture2 = 0x200
};

enum buffer_lock
{
	lock_read,
	lock_write,
	lock_rewrite
};

enum buffer_usage
{
	usage_static,
	usage_dynamic
};

class vbuffer
{
	friend class render;
public:
	virtual ~vbuffer(){}

	virtual void* lock(buffer_lock _lock) = 0;
	virtual void unlock() = 0;

protected:
	u32 m_format;
	u32 m_block_size;
	u32 m_size;
};

class ibuffer
{
	friend class render;
public:
	virtual ~ibuffer(){}

	virtual void* lock(buffer_lock _lock) = 0;
	virtual void unlock()=0;

protected:
	u32 m_size;

};

#endif